<%@page import="org.json.simple.JSONArray"%>
<%@page import="org.json.me.JSONObject"%>
<%@page import="java.util.Arrays"%>
<%@page import="java.util.Collection"%>
<%@page import="java.util.logging.Logger"%>
<%@page import="java.util.logging.Level"%>
<%@page import="s.f.util.AppException"%>
<%@page import="s.f.localidad.CRUD_Localidad"%>
<%@page import="java.util.Map"%>
<%@page import="java.util.ArrayList"%>
<%@page contentType="text/html; charset=UTF-8" trimDirectiveWhitespaces="true"%>
<%
    //String pais = request.getParameter("pais");
    ArrayList<Map> colPaises;
    JSONArray jarray = new JSONArray();
    response.setContentType("application/x-json;charset=UTF-8");
    try {
        colPaises = (ArrayList<Map>) CRUD_Localidad.selectPaises();
        jarray.addAll(colPaises);
    } catch (AppException ex) {
        Logger.getLogger(Servlet.class.getName()).log(Level.SEVERE, null, ex);
    }
    out.print(jarray.toJSONString());
    out.flush();
%>